package com.glacier.yuyuan.modules.admin.sys.domain;

import java.io.Serializable;
import java.util.Objects;

/**
 * date 2023-01-07 17:34
 * 角色和菜单关联类
 *
 * @author glacier
 * @version 1.0.0
 */
public class RoleMenu implements Serializable {

    private static final long serialVersionUID = -2024259645345244328L;
    /**
     * 角色id
     */
    private String roleId;

    /**
     * 菜单id
     */
    private String menuId;

    public RoleMenu() {
    }

    public RoleMenu(String roleId, String menuId) {
        this.roleId = roleId;
        this.menuId = menuId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof RoleMenu)) return false;
        RoleMenu roleMenu = (RoleMenu) o;
        return Objects.equals(roleId, roleMenu.roleId) && Objects.equals(menuId, roleMenu.menuId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roleId, menuId);
    }

    @Override
    public String toString() {
        return "RoleMenu{" +
                "roleId='" + roleId + '\'' +
                ", menuId='" + menuId + '\'' +
                '}';
    }
}
